<template>
  <a-alert type="error" v-if="props.classify" banner>
            <template #icon><TagOutlined /></template>
          <template #description>
            <b>{{data}}</b>
          </template>
        </a-alert>
</template>

<script setup>
import { StarOutlined, TagOutlined, StarTwoTone } from "@ant-design/icons-vue";
import { ref, onMounted ,watch} from "vue";
import pmpHooks from "@/hooks/PmpHooks.js";
const props = defineProps({
  classify: {
    type: String,
    default: () => "",
  },
});
const data = ref("")

onMounted(async function(){
    data.value = await pmpHooks.loadClassifyDict(props.classify)
})


watch(() => props.classify,async (newValue, oldValue) => {
    console.log("====watch===",newValue,oldValue)
    data.value = await pmpHooks.loadClassifyDict(newValue)
})
</script>

<style>

</style>